import { computed } from 'vue'
export function useAttrs(attrList: IAttr[]) {
  return computed(() => {
    const attrs = <{[k:string]:any}>{}
    if (attrList && attrList.length) {
      for (const attr of attrList) {
        attrs[attr.name] = attr.value
      }
    }
    return attrs
  })
}